<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAkbusMaterialTyreOutDetailTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_material_tyre_out_detail', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('tyre_out_id')->nullable()->comment('物资出库id');
            $table->unsignedBigInteger('material_id')->nullable()->comment('物资id');
            $table->string('line')->nullable()->comment('线路');
            $table->string('bus_num')->nullable()->comment('车号');
            $table->string('specs')->nullable()->comment('规格');
            $table->tinyInteger('unit')->nullable()->comment('单位');
            $table->integer('amount')->nullable()->comment('数量');
            $table->decimal('price',10,2)->nullable()->comment('单价');
            $table->tinyInteger('del_state')->nullable()->comment('删除状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_material_tyre_out_detail');
    }
}
